Introduction to Machine Learning (The Complete MBA CourseWork Series Book 8) by Ibnalkadi Hicham & Mohamed

Introduction to Machine Learning (The Complete MBA CourseWork Series Book 8) by Ibnalkadi Hicham & Mohamed

Author:Ibnalkadi, Hicham & Mohamed [Ibnalkadi, Hicham and Mohamed]
Language: eng
Format: epub
Published: 2021-02-01T16:00:00+00:00


Where refers to the minimum and maximum value of the attribute

K-nearest-neighbor classification assigns the most common class among its k nearest neighbors for the unknown example. When k = 1, the unknown tuple is assigned the class of the training tuple that is closest to it in pattern space. The distance measure is possible for numerical features, considering a feature having categorical values such as . For understanding this, consider a feature color having value in example and value in example . Then the difference between the two can be considered as , and if values for the feature are for both examples, then the difference can be considered as .

Missing values also need to be taken into consideration before proceeding to this classification method. If the numerical value of a feature is missing from either one of the examples, then we can assume the maximum possible difference. Another problem to be addressed is the decision of a better value. We decide this experimentally, and we may start with , then use a test set to estimate the error ratio of the classifier. This process can be continued by incrementing gradually and finding a value that produces a minimum error ratio for the classifier. In general, the larger the number of training examples, the larger the value of k will be.

Although we have used Euclidean distance as a distance measure, other distance measures such as Manhattan distance or Mahala Nobis distance. Now let us see the working of K-nearest neighbor classification via an example

Consider the given dataset and find the class label for the sample X having features (3,7)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.